﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using ERPStore.Extensions;

namespace ERPStore
{
	public class ERPStoreConfiguration
	{
		private Lazy<Logging.ILogger> m_Logger;

		public ERPStoreConfiguration()
		{
			m_Logger = new Lazy<Logging.ILogger>(() =>
			{
				return DependencyResolver.GetService<Logging.ILogger>();
			});
			FailedOnInitialize = false;
		}
		public IOC.IDependencyResolver DependencyResolver { get; set; }
		public Logging.ILogger Logger 
		{
			get
			{
				return m_Logger.Value;
			}
		}
		public IServicesContainer Services { get; set; }
		public Settings.WebSiteSettings Settings { get; set; }
		public string HosterName { get; set; }
		public Models.ExecutingContext ExecutingContext { get; set; }
		public bool DebugEnabled { get; set; }
		public bool Shutdown { get; set; }
		public bool FailedOnInitialize { get; set; }
		public Exception FirstError { get; set; }
	}
}
